<!DOCTYPE html>
<html>
<head>
    <meta charset='UTF-8'>
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <game></game>
        <hello></hello>
    </div>
</body>
<!--   JS   -->
    <script>
        const game = Vue.extend({
            name:'game',
            template:`
            <div>
                <h2>游戏名称:{{gamename}}</h2>
                <h2>游戏城市:{{city}}</h2>
            </div>
            `,
            data(){
                return{
                gamename:'光与夜之恋',
                city:'光启市',
                }
            },
        })

        const hello = Vue.extend({
            template:`<h2>{{msg}}</h2>`,
            data(){
                return{
                    msg:'hello'
                }
            }
        })
        console.log('@',game)
        console.log('#',hello)
        const vm = new Vue({
            el:'#root',
            components:{game,hello}
        })
    </script>
</html>